package com.hnkywl.sts.dao.shgl;

import com.hnkywl.sts.dao.base.RegionDao;
import com.hnkywl.sts.entity.sfgl.Sfk;
import com.hnkywl.sts.entity.shgl.Wbzjgk;
import com.hnkywl.sts.entity.xsgl.Xsd;
import net.ruixin.orm.hibernate.Page;
import net.ruixin.orm.hibernate.SimpleHibernateTemplate;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

import java.util.*;

/**
 * 说明：
 * 包:        com.hnkywl.sts.dao.sfgl
 * 类描述:    无保证金赎货dao类
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Repository
public class WbzjshDao extends SimpleHibernateTemplate<Wbzjgk, Long> {

    public Wbzjgk findNoBondGk(Xsd xsd) {
        String hql = "from Wbzjgk where xsd_id= ?";
        List<Wbzjgk> list = this.find(hql, xsd.getId());
        if (null != list && list.size() > 0) {
            return list.get(0);
        }
        return null;
    }

    public List<Wbzjgk> findAllNoBondGk(Xsd xsd) {
        String hql = "from Wbzjgk where xsd_id= ?";
        List<Wbzjgk> list = this.find(hql, xsd.getId());
        return list;
    }
}
